/**
 * (C) Copyright 2009, by Gaixie.org and Contributors.
 * 
 * Project Info:  http://jingsy.gaixie.org/
 *
 * JingsY is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * JingsY is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with JingsY.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
package org.gaixie.jingsy.cli;

import java.io.File;  
import java.io.IOException;

import javax.xml.transform.TransformerException;

import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.gaixie.jingsy.mysql.Mwb2Html;

/**
 * 
 */
public class JingsYCli { 

    public static void main(String[] args) {
	String filename = "";
        if (args.length == 0) { 
            System.out.println("Usage: jingsy file" );
	    System.exit(-1);
        }

	Mwb2Html dom4j = new Mwb2Html();
	try {
	    dom4j.parse(args[0]);
	    System.out.println("\n==========================================");
	    System.out.println("Generate successful.");
	    System.out.println("==========================================\n");
	} catch (DocumentException de) {
	    System.out.println(de.getMessage());
	} catch (IOException ie) {
	    System.out.println(ie.getMessage());
	} catch (TransformerException te) {
	    System.out.println(te.getMessage());
	}
    }
}
